package generic;

public class GenericTypeClass<E> {
    private E[] stacks;
    private final Integer INIT_CAPACITY = 16;

    public GenericTypeClass() {
        // non-reifiable type
//        Need: compile time type checking is sufficient
//        Code size: avoid STL-like code bloat
//        Performance: avoid type checking at runtime that was already done at compile
//        Type erasure ensures that no new classes are created for parameterized types; consequently, generics incur no runtime overhead.
//
//        In short, 1-5 are reifiable because they simply remain the same types as specified in the code so there is no type information lost/erased, but 6-8 will lose type information during compilation (the stuff between the <>) so can't be accessed at runtime.


//        this.stacks = new E[INIT_CAPACITY];
        this.stacks = (E[]) new Object[INIT_CAPACITY];

    }
}
